/**
 * \file InfoManager.h
 * \author Niels van Galen Last & Erik Kok
 * \date 01-15-08
 */
#ifndef INFO_MANAGER_H
#define INFO_MANAGER_H

#include <Ogre.h>
#include <OgreTextAreaOverlayElement.h>
#include <OgreFontManager.h> 
#include "ExampleFrameListener.h"

#include <string>
#include <sstream>

using namespace std;

#define FONT_FILE_NAME 	"solo5.ttf"
#define FONT_FOLDER 	"~/monkeyinvaders/src/Media/fonts"

/**
 * InfoManager is responsible for managing all the text written on the screen.
 */
class InfoManager
{
	public:
		/// Default constructor
		InfoManager();
	
		/// Default destructor
		~InfoManager() {}
			
		/**
		 * Update a overlay with a new text.
			\param string Which overlay are we going to overwrite
			\param string The text we are going to write on it
			\param int A value that could be displayed on the screen
		 */
		void update_overlay(string which, string capt, int val = NULL);
			
		/**
		 * Create a new overlay on draw it on the screen
			\param string The name of the panel
			\param string The name of the area
			\param string The name of the overlay
			\param int The x axis position
			\param int The y axis position
			\param int The height of the font
		*/
		void create_new_overlay(string panelname, string areaname, 
				string overlayname, int xpos, int ypos, int charheight);
			
		/**
		 * Convert a string from a given value
		 \param int The value
		 \return string The return string
		 */
		string to_string(int val);
		
		/**
		 * Convert a string from a given value
		 \param float The value
		 \return string The return string
		 */
		string to_string(float val);
			
	private:
		ResourceGroupManager* resGroupMgr;	
		FontManager* fontMgr;
	
		ResourcePtr font;
	
		OverlayManager* overlayMgr;
	
		Ogre::OverlayContainer* panel;
	
		TextAreaOverlayElement* textArea;
	
		Ogre::Overlay* overlay;
};


#endif
